const state = {
  sider: {
    opened: true
  },
  nav: {
    isHide: false
  }
}
const mutations = {
  TRIGGE_STATUS (state) {
    state.sider.opened = !state.sider.opened
  },
  CLOSE_SIDE_BAR (state, isFold) {
    state.sider.opened = !isFold
    state.nav.isHide = isFold
  }
}

const actions = {
  triggeStatus (context) {
    context.commit('TRIGGE_STATUS')
  },
  closeSideBar ({ commit }, isFold) {
    commit('CLOSE_SIDE_BAR', isFold)
  }
}

const app = {
  namespaced: true,
  state,
  mutations,
  actions
}

export default app
